import { request } from '@/utils/request'

// 获取横幅广告列表
export function getBannerList() {
  return request('/m/community/cms/banner', 'POST')
}

// 获取美食推荐列表
export function getFoodList() {
  return request('/m/community/cms/foods', 'POST')
}

// 获取通知公告列表
export function getNoticeList() {
  return request('/m/community/cms/notice', 'POST')
}

// 获取美食和通知详情
export function getFoodAndNoticeDetail(data) {
  return request('/m/community/cms/get', 'POST', data)
}

// 获取投诉电话和工作时间
export function getComplaintInfo() {
  return request('/m/feedback/cms/config', 'POST')
}

// 获取常见问题列表
export function getQuestionList() {
  return request('/m/feedback/cms/question', 'POST')
}

// 新增投诉与反馈
export function addFeedback(data) {
  return request('/feedback/add', 'POST', data)
}

// 关闭投诉反馈
export function closeFeedback(feedbackId) {
  return request('/feedback/close', 'POST', { feedbackId })
}

// 获取投诉反馈详情
export function getFeedbackDetail(feedbackId) {
  return request('/feedback/get', 'POST', { feedbackId })
}

// 投诉反馈记录列表
export function getFeedbackList(data) {
  return request('/feedback/list', 'POST', data)
}

// 获取美食推荐详情
export function getFoodDetail(articleId) {
  return request('/m/community/food/get', 'POST', { articleId })
}

// 点赞美食推荐
export function dianzanFood(articleId) {
  return request('/m/community/food/dianzan', 'POST', { articleId })
}

// 喜欢美食推荐
export function xihuanFood(articleId) {
  return request('/m/community/food/xihuan', 'POST', { articleId })
}

// 收藏美食推荐
export function shoucangFood(articleId) {
  return request('/community/food/shoucang', 'POST', { articleId })
}

// 获取手绘地图配置信息
export function getMapConfig() {
  return request('/m/community/ditu/config', 'POST')
}

// 获取地图上显示的商家列表
export function getMapShopList() {
  return request('/m/community/ditu/merchants', 'POST')
}

// 获取地图上显示的景点列表
export function getMapSightList() {
  return request('/m/community/ditu/jingdian', 'POST')
}

// 获取首页通知公告弹窗消息
export function getNoticePopup(openid) {
  return request('/m/community/notice/latest', 'POST', { openid })
}

// 商业服务-分页查询
export function getBusinessList(data) {
  return request('/m/community/businessservice/list', 'GET', data)
}

// 获取商业服务详情
export function getBusinessDetail(id) {
  return request('/m/community/businessservice/get', 'POST', { id })
}
